home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Compilers / digital marsC compier / dm / include / win32 / Prsht.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-08  |  12.3 KB  |  425 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * prsht.h - - Interface for the Windows Property Sheet Pages                  *
  4. *                                                                             *
  5. * Version 1.0                                                                 *
  6. *                                                                             *
  7. * Copyright (c) 1991-1996, Microsoft Corp.      All rights reserved.          *
  8. *                                                                             *
  9. \*****************************************************************************/
  10.  
  11. #ifndef _PRSHT_H_
  12. #define _PRSHT_H_
  13.  
  14. //
  15. // Define API decoration for direct importing of DLL references.
  16. //
  17. #ifndef WINCOMMCTRLAPI
  18. #if !defined(_COMCTL32_) && defined(_WIN32)
  19. #define WINCOMMCTRLAPI DECLSPEC_IMPORT
  20. #else
  21. #define WINCOMMCTRLAPI
  22. #endif
  23. #endif // WINCOMMCTRLAPI
  24.  
  25. //
  26. // For compilers that don't support nameless unions
  27. //
  28. #ifndef DUMMYUNIONNAME
  29. #ifdef NONAMELESSUNION
  30. #define DUMMYUNIONNAME   u
  31. #define DUMMYUNIONNAME2  u2
  32. #define DUMMYUNIONNAME3  u3
  33. #else
  34. #define DUMMYUNIONNAME
  35. #define DUMMYUNIONNAME2
  36. #define DUMMYUNIONNAME3
  37. #endif
  38. #endif // DUMMYUNIONNAME
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43.  
  44.  
  45. #ifndef SNDMSG
  46. #ifdef __cplusplus
  47. #define SNDMSG ::SendMessage
  48. #else
  49. #define SNDMSG SendMessage
  50. #endif
  51. #endif // ifndef SNDMSG
  52.  
  53. #define MAXPROPPAGES            100
  54.  
  55. struct _PSP;
  56. typedef struct _PSP FAR* HPROPSHEETPAGE;
  57.  
  58. #ifndef MIDL_PASS
  59. struct _PROPSHEETPAGEA;
  60. struct _PROPSHEETPAGEW;
  61. #endif
  62.  
  63. typedef UINT (CALLBACK FAR * LPFNPSPCALLBACKA)(HWND hwnd, UINT uMsg, struct _PROPSHEETPAGEA FAR *ppsp);
  64. typedef UINT (CALLBACK FAR * LPFNPSPCALLBACKW)(HWND hwnd, UINT uMsg, struct _PROPSHEETPAGEW FAR *ppsp);
  65.  
  66. #ifdef UNICODE
  67. #define LPFNPSPCALLBACK         LPFNPSPCALLBACKW
  68. #else
  69. #define LPFNPSPCALLBACK         LPFNPSPCALLBACKA
  70. #endif
  71.  
  72. #define PSP_DEFAULT             0x0000
  73. #define PSP_DLGINDIRECT         0x0001
  74. #define PSP_USEHICON            0x0002
  75. #define PSP_USEICONID           0x0004
  76. #define PSP_USETITLE            0x0008
  77. #define PSP_RTLREADING          0x0010
  78.  
  79. #define PSP_HASHELP             0x0020
  80. #define PSP_USEREFPARENT        0x0040
  81. #define PSP_USECALLBACK         0x0080
  82.  
  83.  
  84. #define PSPCB_RELEASE           1
  85. #define PSPCB_CREATE            2
  86.  
  87.  
  88. typedef struct _PROPSHEETPAGEA {
  89.         DWORD           dwSize;
  90.         DWORD           dwFlags;
  91.         HINSTANCE       hInstance;
  92.         union {
  93.             LPCSTR          pszTemplate;
  94. #ifdef _WIN32
  95.             LPCDLGTEMPLATE  pResource;
  96. #else
  97.             const VOID FAR *pResource;
  98. #endif
  99.         } DUMMYUNIONNAME;
  100.         union {
  101.             HICON       hIcon;
  102.             LPCSTR      pszIcon;
  103.         } DUMMYUNIONNAME2;
  104.         LPCSTR          pszTitle;
  105.         DLGPROC         pfnDlgProc;
  106.         LPARAM          lParam;
  107.         LPFNPSPCALLBACKA pfnCallback;
  108.         UINT FAR * pcRefParent;
  109. } PROPSHEETPAGEA, FAR *LPPROPSHEETPAGEA;
  110. typedef const PROPSHEETPAGEA FAR *LPCPROPSHEETPAGEA;
  111.  
  112. typedef struct _PROPSHEETPAGEW {
  113.         DWORD           dwSize;
  114.         DWORD           dwFlags;
  115.         HINSTANCE       hInstance;
  116.         union {
  117.             LPCWSTR          pszTemplate;
  118. #ifdef _WIN32
  119.             LPCDLGTEMPLATE  pResource;
  120. #else
  121.             const VOID FAR *pResource;
  122. #endif
  123.         }DUMMYUNIONNAME;
  124.         union {
  125.             HICON       hIcon;
  126.             LPCWSTR      pszIcon;
  127.         }DUMMYUNIONNAME2;
  128.         LPCWSTR          pszTitle;
  129.         DLGPROC         pfnDlgProc;
  130.         LPARAM          lParam;
  131.         LPFNPSPCALLBACKW pfnCallback;
  132.         UINT FAR * pcRefParent;
  133. } PROPSHEETPAGEW, FAR *LPPROPSHEETPAGEW;
  134. typedef const PROPSHEETPAGEW FAR *LPCPROPSHEETPAGEW;
  135.  
  136. #ifdef UNICODE
  137. #define PROPSHEETPAGE           PROPSHEETPAGEW
  138. #define LPPROPSHEETPAGE         LPPROPSHEETPAGEW
  139. #define LPCPROPSHEETPAGE        LPCPROPSHEETPAGEW
  140. #else
  141. #define PROPSHEETPAGE           PROPSHEETPAGEA
  142. #define LPPROPSHEETPAGE         LPPROPSHEETPAGEA
  143. #define LPCPROPSHEETPAGE        LPCPROPSHEETPAGEA
  144. #endif
  145.  
  146.  
  147. #define PSH_DEFAULT             0x0000
  148. #define PSH_PROPTITLE           0x0001
  149. #define PSH_USEHICON            0x0002
  150. #define PSH_USEICONID           0x0004
  151. #define PSH_PROPSHEETPAGE       0x0008
  152. #define PSH_WIZARD              0x0020
  153. #define PSH_USEPSTARTPAGE       0x0040
  154. #define PSH_NOAPPLYNOW          0x0080
  155. #define PSH_USECALLBACK         0x0100
  156. #define PSH_HASHELP             0x0200
  157. #define PSH_MODELESS            0x0400
  158. #define PSH_RTLREADING          0x0800
  159.  
  160. typedef int (CALLBACK *PFNPROPSHEETCALLBACK)(HWND, UINT, LPARAM);
  161.  
  162. typedef struct _PROPSHEETHEADERA {
  163.         DWORD           dwSize;
  164.         DWORD           dwFlags;
  165.         HWND            hwndParent;
  166.         HINSTANCE       hInstance;
  167.         union {
  168.             HICON       hIcon;
  169.             LPCSTR      pszIcon;
  170.         }DUMMYUNIONNAME;
  171.         LPCSTR          pszCaption;
  172.  
  173.  
  174.         UINT            nPages;
  175.         union {
  176.             UINT        nStartPage;
  177.             LPCSTR      pStartPage;
  178.         }DUMMYUNIONNAME2;
  179.         union {
  180.             LPCPROPSHEETPAGEA ppsp;
  181.             HPROPSHEETPAGE FAR *phpage;
  182.         }DUMMYUNIONNAME3;
  183.         PFNPROPSHEETCALLBACK pfnCallback;
  184. } PROPSHEETHEADERA, FAR *LPPROPSHEETHEADERA;
  185. typedef const PROPSHEETHEADERA FAR *LPCPROPSHEETHEADERA;
  186.  
  187. typedef struct _PROPSHEETHEADERW {
  188.         DWORD           dwSize;
  189.         DWORD           dwFlags;
  190.         HWND            hwndParent;
  191.         HINSTANCE       hInstance;
  192.         union {
  193.             HICON       hIcon;
  194.             LPCWSTR     pszIcon;
  195.         }DUMMYUNIONNAME;
  196.         LPCWSTR         pszCaption;
  197.  
  198.  
  199.         UINT            nPages;
  200.         union {
  201.             UINT        nStartPage;
  202.             LPCWSTR     pStartPage;
  203.         }DUMMYUNIONNAME2;
  204.         union {
  205.             LPCPROPSHEETPAGEW ppsp;
  206.             HPROPSHEETPAGE FAR *phpage;
  207.         }DUMMYUNIONNAME3;
  208.         PFNPROPSHEETCALLBACK pfnCallback;
  209. } PROPSHEETHEADERW, FAR *LPPROPSHEETHEADERW;
  210. typedef const PROPSHEETHEADERW FAR *LPCPROPSHEETHEADERW;
  211.  
  212. #ifdef UNICODE
  213. #define PROPSHEETHEADER         PROPSHEETHEADERW
  214. #define LPPROPSHEETHEADER       LPPROPSHEETHEADERW
  215. #define LPCPROPSHEETHEADER      LPCPROPSHEETHEADERW
  216. #else
  217. #define PROPSHEETHEADER         PROPSHEETHEADERA
  218. #define LPPROPSHEETHEADER       LPPROPSHEETHEADERA
  219. #define LPCPROPSHEETHEADER      LPCPROPSHEETHEADERA
  220. #endif
  221.  
  222.  
  223. #define PSCB_INITIALIZED  1
  224. #define PSCB_PRECREATE    2
  225.  
  226. WINCOMMCTRLAPI HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA);
  227. WINCOMMCTRLAPI HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW);
  228. WINCOMMCTRLAPI BOOL           WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE);
  229. WINCOMMCTRLAPI int            WINAPI PropertySheetA(LPCPROPSHEETHEADERA);
  230. WINCOMMCTRLAPI int            WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
  231.  
  232. #ifdef UNICODE
  233. #define CreatePropertySheetPage  CreatePropertySheetPageW
  234. #define PropertySheet            PropertySheetW
  235. #else
  236. #define CreatePropertySheetPage  CreatePropertySheetPageA
  237. #define PropertySheet            PropertySheetA
  238. #endif
  239.  
  240.  
  241.  
  242. typedef BOOL (CALLBACK FAR * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
  243. typedef BOOL (CALLBACK FAR * LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE, LPARAM);
  244.  
  245.  
  246. typedef struct _PSHNOTIFY
  247. {
  248.     NMHDR hdr;
  249.     LPARAM lParam;
  250. } PSHNOTIFY, FAR *LPPSHNOTIFY;
  251.  
  252.  
  253. #define PSN_FIRST               (0U-200U)
  254. #define PSN_LAST                (0U-299U)
  255.  
  256.  
  257. #define PSN_SETACTIVE           (PSN_FIRST-0)
  258. #define PSN_KILLACTIVE          (PSN_FIRST-1)
  259. // #define PSN_VALIDATE            (PSN_FIRST-1)
  260. #define PSN_APPLY               (PSN_FIRST-2)
  261. #define PSN_RESET               (PSN_FIRST-3)
  262. // #define PSN_CANCEL              (PSN_FIRST-3)
  263. #define PSN_HELP                (PSN_FIRST-5)
  264. #define PSN_WIZBACK             (PSN_FIRST-6)
  265. #define PSN_WIZNEXT             (PSN_FIRST-7)
  266. #define PSN_WIZFINISH           (PSN_FIRST-8)
  267. #define PSN_QUERYCANCEL         (PSN_FIRST-9)
  268.  
  269.  
  270. #define PSNRET_NOERROR              0
  271. #define PSNRET_INVALID              1
  272. #define PSNRET_INVALID_NOCHANGEPAGE 2
  273.  
  274.  
  275. #define PSM_SETCURSEL           (WM_USER + 101)
  276. #define PropSheet_SetCurSel(hDlg, hpage, index) \
  277.         SNDMSG(hDlg, PSM_SETCURSEL, (WPARAM)index, (LPARAM)hpage)
  278.  
  279.  
  280. #define PSM_REMOVEPAGE          (WM_USER + 102)
  281. #define PropSheet_RemovePage(hDlg, index, hpage) \
  282.         SNDMSG(hDlg, PSM_REMOVEPAGE, index, (LPARAM)hpage)
  283.  
  284.  
  285. #define PSM_ADDPAGE             (WM_USER + 103)
  286. #define PropSheet_AddPage(hDlg, hpage) \
  287.         SNDMSG(hDlg, PSM_ADDPAGE, 0, (LPARAM)hpage)
  288.  
  289.  
  290. #define PSM_CHANGED             (WM_USER + 104)
  291. #define PropSheet_Changed(hDlg, hwnd) \
  292.         SNDMSG(hDlg, PSM_CHANGED, (WPARAM)hwnd, 0L)
  293.  
  294.  
  295. #define PSM_RESTARTWINDOWS      (WM_USER + 105)
  296. #define PropSheet_RestartWindows(hDlg) \
  297.         SNDMSG(hDlg, PSM_RESTARTWINDOWS, 0, 0L)
  298.  
  299.  
  300. #define PSM_REBOOTSYSTEM        (WM_USER + 106)
  301. #define PropSheet_RebootSystem(hDlg) \
  302.         SNDMSG(hDlg, PSM_REBOOTSYSTEM, 0, 0L)
  303.  
  304.  
  305. #define PSM_CANCELTOCLOSE       (WM_USER + 107)
  306. #define PropSheet_CancelToClose(hDlg) \
  307.         PostMessage(hDlg, PSM_CANCELTOCLOSE, 0, 0L)
  308.  
  309.  
  310. #define PSM_QUERYSIBLINGS       (WM_USER + 108)
  311. #define PropSheet_QuerySiblings(hDlg, wParam, lParam) \
  312.         SNDMSG(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)
  313.  
  314.  
  315. #define PSM_UNCHANGED           (WM_USER + 109)
  316. #define PropSheet_UnChanged(hDlg, hwnd) \
  317.         SNDMSG(hDlg, PSM_UNCHANGED, (WPARAM)hwnd, 0L)
  318.  
  319.  
  320. #define PSM_APPLY               (WM_USER + 110)
  321. #define PropSheet_Apply(hDlg) \
  322.         SNDMSG(hDlg, PSM_APPLY, 0, 0L)
  323.  
  324.  
  325. #define PSM_SETTITLEA           (WM_USER + 111)
  326. #define PSM_SETTITLEW           (WM_USER + 120)
  327.  
  328. #ifdef UNICODE
  329. #define PSM_SETTITLE            PSM_SETTITLEW
  330. #else
  331. #define PSM_SETTITLE            PSM_SETTITLEA
  332. #endif
  333.  
  334. #define PropSheet_SetTitle(hDlg, wStyle, lpszText)\
  335.         SNDMSG(hDlg, PSM_SETTITLE, wStyle, (LPARAM)(LPCTSTR)lpszText)
  336.  
  337.  
  338. #define PSM_SETWIZBUTTONS       (WM_USER + 112)
  339. #define PropSheet_SetWizButtons(hDlg, dwFlags) \
  340.         PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, (LPARAM)dwFlags)
  341.  
  342.  
  343.  
  344. #define PSWIZB_BACK             0x00000001
  345. #define PSWIZB_NEXT             0x00000002
  346. #define PSWIZB_FINISH           0x00000004
  347. #define PSWIZB_DISABLEDFINISH   0x00000008
  348.  
  349.  
  350. #define PSM_PRESSBUTTON         (WM_USER + 113)
  351. #define PropSheet_PressButton(hDlg, iButton) \
  352.         PostMessage(hDlg, PSM_PRESSBUTTON, (WPARAM)iButton, 0)
  353.  
  354.  
  355. #define PSBTN_BACK              0
  356. #define PSBTN_NEXT              1
  357. #define PSBTN_FINISH            2
  358. #define PSBTN_OK                3
  359. #define PSBTN_APPLYNOW          4
  360. #define PSBTN_CANCEL            5
  361. #define PSBTN_HELP              6
  362. #define PSBTN_MAX               6
  363.  
  364.  
  365.  
  366. #define PSM_SETCURSELID         (WM_USER + 114)
  367. #define PropSheet_SetCurSelByID(hDlg, id) \
  368.         SNDMSG(hDlg, PSM_SETCURSELID, 0, (LPARAM)id)
  369.  
  370.  
  371. #define PSM_SETFINISHTEXTA      (WM_USER + 115)
  372. #define PSM_SETFINISHTEXTW      (WM_USER + 121)
  373.  
  374. #ifdef UNICODE
  375. #define PSM_SETFINISHTEXT       PSM_SETFINISHTEXTW
  376. #else
  377. #define PSM_SETFINISHTEXT       PSM_SETFINISHTEXTA
  378. #endif
  379.  
  380. #define PropSheet_SetFinishText(hDlg, lpszText) \
  381.         SNDMSG(hDlg, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText)
  382.  
  383.  
  384. #define PSM_GETTABCONTROL       (WM_USER + 116)
  385. #define PropSheet_GetTabControl(hDlg) \
  386.         (HWND)SNDMSG(hDlg, PSM_GETTABCONTROL, 0, 0)
  387.  
  388. #define PSM_ISDIALOGMESSAGE     (WM_USER + 117)
  389. #define PropSheet_IsDialogMessage(hDlg, pMsg) \
  390.         (BOOL)SNDMSG(hDlg, PSM_ISDIALOGMESSAGE, 0, (LPARAM)pMsg)
  391.  
  392. #define PSM_GETCURRENTPAGEHWND  (WM_USER + 118)
  393. #define PropSheet_GetCurrentPageHwnd(hDlg) \
  394.         (HWND)SNDMSG(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0L)
  395.  
  396. #define ID_PSRESTARTWINDOWS     0x2
  397. #define ID_PSREBOOTSYSTEM       (ID_PSRESTARTWINDOWS | 0x1)
  398.  
  399.  
  400. #define WIZ_CXDLG               276
  401. #define WIZ_CYDLG               140
  402.  
  403. #define WIZ_CXBMP               80
  404.  
  405. #define WIZ_BODYX               92
  406. #define WIZ_BODYCX              184
  407.  
  408. #define PROP_SM_CXDLG           212
  409. #define PROP_SM_CYDLG           188
  410.  
  411. #define PROP_MED_CXDLG          227
  412. #define PROP_MED_CYDLG          215
  413.  
  414. #define PROP_LG_CXDLG           252
  415. #define PROP_LG_CYDLG           218
  416.  
  417.  
  418.  
  419. #ifdef __cplusplus
  420. }
  421. #endif
  422.  
  423.  
  424. #endif  // _PRSHT_H_
  425.